<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
 
<script type="text/javascript" src="${contextPath}/resources/lib/jquery/1.9.1/jquery.js"></script>
 	<style type="text/css">
 		.td_c{
 			text-align: center;
 		}
 		.td_l{
 			text-align: left;
 		}
 		.td_r{
 			text-align: right;
 		}
 	</style>
    <div class="zp_pop" style="padding: 2px;">
        <table class="table table-border table-bordered table-bg">
        <input id="exchangeId"   name="exchangeId" type="hidden" value="${exchange.id}">
        <input id="exchangeType"   name="exchangeType" type="hidden" value="${exchange.exchangeType}">
          <tr>
          	<th colspan="4">商品信息</th>
          </tr>
          <tr class="text-c" >
             <th class="td_c" style="width:25%;">订单编号</th>
             <th class="td_c" style="width:25%;">商品名称</th>
             <th class="td_c" style="width:25%;">条形码</th>
             <th class="td_c" style="width:25%;">商品单价</th>
           </tr>
            <tr class="text-c" >
             <td class="td_c">${exchange.order.id}</td>
             <td class="td_c">${exchange.prodName}</td>
             <td class="td_c"><#if exchange.prodNo!='null'&& exchange.prodNo??>${exchange.prodNo}</#if></td>
             <td class="td_c"> ${exchange.prodMileage}里程</td>
           </tr>
            
          <tr class="text-c"  >  
             <th>退换货类型</th>
             <th>原因</th>
             <th>商品数量</th>
             <th>总计金额</th>
            </tr>
            <tr class="text-c">
             <td class="td_c"> 
             	 <#if excheMapType[exchange.exchangeType]??>
					     ${excheMapType[exchange.exchangeType]}
				</#if>	
             </td>
             <td class="td_c">	
             	 <#if excheMapReson[exchange.reson]??>
					     ${excheMapReson[exchange.reson]}
				</#if>
             </td>
             <td class="td_c"> ${exchange.prodCount}件</td>
             <td class="td_c">${exchange.prodMileage*exchange.prodCount}里程 </td>
           </tr> 
        </table>    
      <table class="table table-border table-bordered table-bg" style="margin-top: -1px;">
      	  <tr>
          	<th colspan="2">商品外包装情况</th>
          </tr>
          <tr class="text-c" >
             <td class="td_c" style="text-align: left; width:50%;">外观：
             	 <#if excheMapFace[exchange.face]??>
					     ${excheMapFace[exchange.face]}
				</#if>
			</td>
             <td class="td_c" style="text-align: left;width:50%;">外包装：
             	<#if excheMapPackage[exchange.outerPackage]??>
					     ${excheMapPackage[exchange.outerPackage]}
				</#if>
		    </td>
           </tr>
        </table>     
        
           	
         <table class="table table-border table-bordered table-bg" style="margin-top: -1px;">
         <tr>
          	<th colspan="2">商品配件信息</th>
          </tr>
          <tr class="text-c" >
             <td class="td_c" style="text-align: left;width:50%;">商品配件：${exchange.fittings}</td>
             <td class="td_c" style="text-align: left;width:50%;">取货方式：
              <#if excheMapTakeStockway[exchange.takeStockWay]??>
					     ${excheMapTakeStockway[exchange.takeStockWay]}
				</#if>
             </td>
           
           </tr>
            
        </table>  
        
           	
         <table class="table table-border table-bordered table-bg" style="margin-top: -1px;">
         <tr>
          	<th colspan="4">配送信息</th>
          </tr>
          <tr class="text-c" >
             <th class="td_c" style="width:25%;">客户姓名</th>
             <th class="td_c" style="width:25%;">退换人联系电话</th>
            <th class="td_c" style="width:25%;">手机号码</th>
            <th class="td_c" style="width:25%;">送货地址</th>
           </tr>
            <tr class="text-c" >
             <td class="td_c"> ${exchange.exchanger}     </td>             
             <td class="td_c"> ${exchange.tel}	</td>
			 <td class="td_c"> ${exchange.phone}  </td>
             <td class="td_c"> ${exchange.provCityArea}${exchange.address}	</td>
           </tr>
        </table>  
       	 
         <table class="table table-border table-bordered table-bg" style="margin-top: -1px;">

           
        </table>
        
      	<h5> <strong>审核信息:</strong>
      	 <font style="color: red;font-weight: bold;">
      	
      		 <#if exchange.exchangeStatus??>
      		  <#if excheMapStatus[exchange.exchangeStatus?c]??>
					     ${excheMapStatus[exchange.exchangeStatus?c]}
				</#if>
			</#if>		
      	 </font>
      	 </h5>  
      	 					<li>
						<input type="radio" name="status" value="2" checked />
						审核通过

					</li>
					
					<li>
						<input type="radio" name="status" value="1" />
						审核不通过
					</li>
										<li>
						<label>
							审核不通过的原因:
						</label>

						<textarea id="notAduitReson" name="notAduitReson" cols="20" rows="5"></textarea>

					</li>
					                       <li>
                      <input type="button" class="btn btn-success" value="提交" onclick="javascript:showsubmit()" />

                     </li>
    </div>
<@frame.end "default">
</@frame.end>

 
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/search_order_list.js"></script>


<script type="text/javascript">
var path="${contextPath}";
function showsubmit(){
	var exchangeStatus=$('input:radio[name="status"]:checked').val();
	var exchangeid=$("#exchangeId").val();
	var exchangetype=$("#exchangeType").val();
	var notAduitReson=$("#notAduitReson").val();

 	$.ajax({
		url : path + '/exchange/auditExchange',
		dataType : 'text',
		data : {"exchangeid":exchangeid,"exchangetype":exchangetype,"exchangeStatus":exchangeStatus,"notAduitReson":notAduitReson},
		success : function(result) {
			if(result=="200"){
                layer.msg('操作成功!',{icon:1,time:1000},function(){
                	parent.window.location.href = parent.window.location.href;
                	                    });
			}else{
				layer.msg('操作失败!',{icon:1,time:1000},function(){
					parent.window.location.href = parent.window.location.href;
                	                    });
			}
		}
	});	 
}
</script>
 